/*
 * @lc app=leetcode.cn id=867 lang=rust
 *
 * [867] 转置矩阵
 */

// @lc code=start
impl Solution {
    pub fn transpose(matrix: Vec<Vec<i32>>) -> Vec<Vec<i32>> {
        let mut ret = vec![vec![]; matrix[0].len()];

        for i in 0..matrix.len() {
            for j in 0..matrix[i].len(){
                ret[j].push(matrix[i][j]);
            }
        }

        return ret;
    }
}
// @lc code=end

